package com.ls.pattern.flyweight.poker;

import java.util.ArrayList;
import java.util.List;

/**
 * 玩家类
 */
public class Player {

    private String name;

    public Player(String name) {
        this.name = name;
    }

    private List<Poker> pokers = new ArrayList<>();

    public void addPoker(Poker poker) {
        pokers.add(poker);
    }

    public void showPokers() {
        String msg = name + ":";
        for (Poker poker : pokers) {
            msg += poker.getSuitsEnum().getName() + poker.getPointEnum().getName() +  " ";
        }
        System.out.println(msg);
    }

}
